﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace StudentResult
{
    class StudentInfo
    {
        public StudentInfo()
        { 
        }
        // geter and seter mathod for name
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        // geter and seter mathod for Rollno
        private string rollno;

        public string Rollno
        {
            get { return rollno; }
            set { rollno = value; }
        }
        // geter and seter mathod for Sub1
        private int sub1;

        public int Sub1
        {
            get { return sub1; }
            set { sub1 = value; }
        }
        private int sub2;
        // geter and seter mathod for sub2
        public int Sub2
        {
            get { return sub2; }
            set { sub2 = value; }
        }
        // geter and seter mathod for sub3
        private int sub3;

        public int Sub3
        {
            get { return sub3; }
            set { sub3 = value; }
        }
        // geter and seter mathod for sub4
        private int sub4;

        public int Sub4
        {
            get { return sub4; }
            set { sub4 = value; }
        }
        // geter and seter mathod for sub5
        private int sub5;

        public int Sub5
        {
            get { return sub5; }
            set { sub5 = value; }
        }
        private float total;
        // geter and seter mathod for total
        public float Total
        {
            get { return total; }
            set { total = value; }
        }
        // method for total all sub
        public float ResTotal()
        {
            Total = Sub1 + Sub2 + Sub3 + Sub4 + Sub5;
            return Total;
        }
    }
}
